Skip to content

feat(tls,ws): move MaybeTlsStream to tls#516

Merged
Berrysoft merged 4 commits into
compio-rs:masterfrom
Berrysoft:dev/maybe-tls
Nov 17, 2025
Merged

feat(tls,ws): move MaybeTlsStream to tls#516
Berrysoft merged 4 commits into
compio-rs:masterfrom
Berrysoft:dev/maybe-tls

Conversation

@Berrysoft
Copy link
Copy Markdown
Member

Actually I don't want to introduce breaking changes to compio-ws, but MaybeTlsStream was mistakenly made public, so we have to keep the enum public. I think we should make the enum variants private in the next major version.

@Berrysoft Berrysoft self-assigned this Nov 17, 2025
@Berrysoft Berrysoft added the package: tls Related to compio-tls label Nov 17, 2025
George-Miao
George-Miao previously approved these changes Nov 17, 2025
Copy link
Copy Markdown
Member

@George-Miao George-Miao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR moves the MaybeTlsStream type from compio-ws to compio-tls to improve code organization. The implementation now supports both native-tls and rustls features (previously only rustls), with the old location deprecated and re-exported for backward compatibility.

Key changes:

  • Relocated MaybeTlsStream and its trait implementations to a new maybe.rs module in compio-tls
  • Expanded feature flag support from rustls-only to native-tls OR rustls
  • Version bumps for affected packages (compio-tls: 0.7.1 → 0.7.2, compio-ws: 0.1.0 → 0.1.1)

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
compio-ws/src/stream.rs Replaces implementation with deprecation notice and re-export from compio-tls
compio-ws/src/rustls.rs Updates import path to use MaybeTlsStream from compio-tls instead of local module
compio-ws/Cargo.toml Bumps version to 0.1.1
compio-tls/src/maybe.rs Adds new MaybeTlsStream implementation with expanded feature support for both TLS backends
compio-tls/src/lib.rs Exports the new maybe module
compio-tls/Cargo.toml Bumps version to 0.7.2
Cargo.toml Updates workspace dependency version for compio-tls

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread compio-tls/src/maybe.rs
Comment thread compio-tls/src/maybe.rs
Comment thread compio-ws/src/stream.rs Outdated
Comment thread Cargo.toml
@Berrysoft
Copy link
Copy Markdown
Member Author

@George-Miao Ping? Thanks.

@Berrysoft
Copy link
Copy Markdown
Member Author

I think I'll just add some breaking changes in the next PR...

Copy link
Copy Markdown
Member

@George-Miao George-Miao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Berrysoft Berrysoft merged commit 6e760ca into compio-rs:master Nov 17, 2025
47 checks passed
@Berrysoft Berrysoft deleted the dev/maybe-tls branch November 17, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: tls Related to compio-tls

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants